﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VideoNetApplication.Common;
using VideoNetApplication.Common.Helper;
using VideoNetApplication.Common.Service;

namespace VideoNetApplication
{
    public partial class ViewNewsListHtml :BasePage
    {
         
        protected void Page_Load(object sender, EventArgs e)
        {
            
            InitNewsList();

        }
        private  void  InitNewsList()
        {
            var newsService = new NewsService();
            int outcount = 0;
            List<V_News> vNewses = newsService.GetNewsList(SchoolId, pager.StartRecordIndex, pager.PageSize, out outcount);
            pager.RecordCount = outcount;
            repNews.DataSource = vNewses;
            repNews.DataBind();



        }

        protected void pager_PageChanged(object sender, EventArgs e)
        {
            InitNewsList();
        }
    }
}
